﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Security.Permissions;

namespace Reviewer.Entities.Services
{
    /// <summary>
    /// Writer Service Interface
    /// </summary>
    [ServiceContract(Namespace = "Reviewer.Services")]
    public interface IWriterService : IDisposable
    {
        [OperationContract]
        ICollection<Writer> Find();

        [OperationContract]
        Writer Find(int writerId);

        [OperationContract]
        ICollection<Writer> Find(string logOnName);
    }

    /// <summary>
    /// Writer admin Service Interface
    /// </summary>
    [ServiceContract(Namespace = "Reviewer.Services")]
    public interface IWriterAdminService : IDisposable
    {
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "Writer")]
        Writer Save(Writer writer);
    }
}
